package com.kaifamiao.www.demo.do0812;

import java.util.Arrays;
import java.util.List;

public class ArraysDemo {
    public static void main(String[] args) {

        //传递的元素转换成不可修改的 list 对象
        List list = Arrays.asList("a","b","c","d");

        //Collection 集合转数组
        Object[] objs = list.toArray();
        objs[1] = "z";

        //数组转 list 集合
        list = Arrays.asList(objs);

        //list 集合转数组
        list.toArray();
        System.out.println(list);
        System.out.println(Arrays.toString(objs));
    }
}
